
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Grebok.Common;
using Grebok.Common.Configuration;

namespace EVegetable.Persistence.Test.DataManager
{
    public class TeBiz_GoodManager : BaseManager
    {
        #region private field

        private static TeBiz_GoodManager manager;
        #endregion

        #region Properties
        
        public Int32 GoodsID
        {
            get { return GetConfig<Int32>("GoodsID"); }
            set { SetConfig<Int32>("GoodsID", value); }
        }
        
        public Int32? GCatetoryID
        {
            get { return GetConfig<Int32?>("GCatetoryID"); }
            set { SetConfig<Int32?>("GCatetoryID", value); }
        }
        
        public String GoodsCode
        {
            get { return GetConfig<String>("GoodsCode"); }
            set { SetConfig<String>("GoodsCode", value); }
        }
        
        public String GoodsName
        {
            get { return GetConfig<String>("GoodsName"); }
            set { SetConfig<String>("GoodsName", value); }
        }
        
        public String GoodsRec
        {
            get { return GetConfig<String>("GoodsRec"); }
            set { SetConfig<String>("GoodsRec", value); }
        }
        
        public Int32? GoodsQuantity
        {
            get { return GetConfig<Int32?>("GoodsQuantity"); }
            set { SetConfig<Int32?>("GoodsQuantity", value); }
        }
        
        public Int32? Creator
        {
            get { return GetConfig<Int32?>("Creator"); }
            set { SetConfig<Int32?>("Creator", value); }
        }
        
        public DateTime? CreatedDate
        {
            get { return GetConfig<DateTime?>("CreatedDate"); }
            set { SetConfig<DateTime?>("CreatedDate", value); }
        }
        
        public Int32? Modifier
        {
            get { return GetConfig<Int32?>("Modifier"); }
            set { SetConfig<Int32?>("Modifier", value); }
        }
        
        public DateTime? ModifiedDate
        {
            get { return GetConfig<DateTime?>("ModifiedDate"); }
            set { SetConfig<DateTime?>("ModifiedDate", value); }
        }
        

        #endregion

        #region Constructor

        /// <summary>
        /// TeBiz_GoodManager
        /// </summary>
        private TeBiz_GoodManager()
        {
            IApplicationConfiguration configuration = ApplicationConfigurationFactor.CreateApplicationConfiguration();
            appPropertiese = new ApplicationProperties(configuration[PropertiesConst.TEBIZ_GOOD_PROPERTIES_FILE_NAME_KEY],
                configuration[PropertiesConst.TEBIZ_GOOD_PROPERTIES_SECTION_NAME_KEY]);

            appPropertieseValues = new Dictionary<string, object>();
        }
        #endregion

        #region TeBiz_GoodManager Instance

        /// <summary>
        /// TeBiz_GoodManager's Instance
        /// </summary>
        public static TeBiz_GoodManager Instance
        {
            get
            {
                if (manager == null)
                {
                    manager = new TeBiz_GoodManager();
                }
                return manager;
            }
        }
        #endregion

    }
}
